<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0" />
    <title>Scalar API Reference (ESM)</title>
  </head>
  <body>
    <div id="app"></div>

    <script type="module">
      import { createApiReference } from '../../src'

      // CDN:
      // import { createApiReference } from 'https://esm.sh/@scalar/api-reference';

      // Doesn't work:
      // import { createApiReference } from 'https://esm.run/@scalar/api-reference';

      createApiReference('#app', {
        sources: [
          {
            title: 'Scalar Galaxy',
            url: 'https://registry.scalar.com/@scalar/apis/galaxy?format=json',
          },
          {
            title: 'Scalar Galaxy (YAML)',
            url: 'https://registry.scalar.com/@scalar/apis/galaxy?format=yaml',
          },
          // {
          //   title: 'Stripe',
          //   url: 'https://raw.githubusercontent.com/stripe/openapi/refs/heads/master/openapi/spec3.yaml',
          // },
          {
            title: 'Swagger Petstore (2.0)',
            url: 'https://petstore.swagger.io/v2/swagger.json',
          },
          {
            title: 'Swagger Petstore (3.0)',
            url: 'https://petstore3.swagger.io/api/v3/openapi.json',
          },
          // {
          //   title: 'Swagger Petstore (3.1)',
          //   url: 'https://petstore31.swagger.io/api/v31/openapi.json',
          // },
          {
            title: 'Val Town',
            url: 'https://docs.val.town/openapi.documented.json',
          },
          {
            title: 'Outline',
            url: 'https://raw.githubusercontent.com/outline/openapi/refs/heads/main/spec3.yml',
          },
          // {
          //   title: 'Sentry',
          //   url: 'https://raw.githubusercontent.com/getsentry/sentry/refs/heads/master/api-docs/openapi.json',
          // },
          {
            title: 'Vercel',
            url: 'https://openapi.vercel.sh/',
          },
        ],
      })
    </script>
  </body>
</html>
